using System;
using System.Collections.Generic;
using System.Text;

namespace MspEmulator
{
    class updateEHCurrent : ISend, IUpdateDevice
    {
        private byte hCurrentEnable;
        
        public updateEHCurrent(byte value)
        {
            hCurrentEnable = value;
        }
    
        #region IUpdateDevice Members

        public void  updateDevice()
        {
            Device.hCurrentEnable = Convert.ToBoolean(hCurrentEnable);
        }

        #endregion

        #region ISend Members

        public void Send()
        {
            Serial.Send(Utility.buildPack(Utility.collectData((byte)Utility.functCode.heatCurrentEnable)));
        }

        #endregion
    }
}
